import request from '@/utils/request'

// 查询课程项目关系列表
export function listCprela(query) {
  return request({
    url: '/edu/cprela/list',
    method: 'get',
    params: query
  })
}

export function listByIds(query) {
  return request({
    url: '/edu/cprela/listByIds',
    method: 'get',
    params: query
  })
}

// 查询课程项目关系详细
export function getCprela(id) {
  return request({
    url: '/edu/cprela/' + id,
    method: 'get'
  })
}

// 新增课程项目关系
export function addCprela(data) {
  return request({
    url: '/edu/cprela',
    method: 'post',
    data: data
  })
}

// 修改课程项目关系
export function updateCprela(data) {
  return request({
    url: '/edu/cprela',
    method: 'put',
    data: data
  })
}

// 删除课程项目关系
export function delCprela(id) {
  return request({
    url: '/edu/cprela/' + id,
    method: 'delete'
  })
}

export function updateCourseBatch(data) {
  return request({
    url: '/edu/cprela/editBatch',
    method: 'put',
    data: data
  })
}
